package com.paw.ruoyi.admin.common.enums;

import java.util.Arrays;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Rubble
 * @date 2021/8/14
 **/
@Getter
@AllArgsConstructor
public enum UserTypeEnum implements ICommonEnum {

  /**
   * 用户类型
   */
  ADMIN(0,"Admin后台"),
  APP(1,"APP")
  ;
  int code;
  String desc;


  public static UserTypeEnum getEnumByCode (int code) {
    return Arrays.stream(values()).filter(e->e.getCode()==code).findFirst().orElse(null);
  }

}
